﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="HotKeyWordManager.aspx.cs" Inherits="WebApp.Management.Product.HotKeyWordManager" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
                    <asp:ListView ID="lvHotKeyWord" runat="server" DataKeyNames="Id" OnItemCommand="lvSupCategory_ItemCommand">
                        <LayoutTemplate>
                            <table border="1" cellspacing="0">
                                <tr>
                                    <th>
                                        #
                                    </th>
                                    <th>
                                        关键词
                                    </th>
                                    <th>
                                        序列
                                    </th>
                                    <th>
                                        其他
                                    </th>
                                </tr>
                                <asp:PlaceHolder ID="itemPlaceholder" runat="server" />
                                <tr>
                                    <td>
                                        <asp:Button ID="btnNew" runat="server" CommandName="OnNew" Text="新增" />
                                    </td>
                                </tr>
                            </table>
                        </LayoutTemplate>
                        <EmptyDataTemplate>
                            <asp:Button ID="btnNew" runat="server" CommandName="OnNew" Text="新增" />
                        </EmptyDataTemplate>
                        <ItemTemplate>
                            <tr>
                                <td>
                                    <%# Container.DataItemIndex+1 %><asp:HiddenField ID="hfId" runat="server" Value='<%#Eval("Id") %>' />
                                </td>
                                <td>
                                    <%# Eval("HotKeyWord1") %>
                                    <%--<asp:LinkButton ID="btnSubCategory" runat="server" CommandName="OnSubCategory" CommandArgument='<%# Eval("CategoryId") %>'><%# Eval("Name") %></asp:LinkButton>--%>
                                </td>
                                <td>
                                    <%# Eval("ViewTimes")%>
                                    <%--<asp:Image runat="server" ID="imagePicture" ImageUrl='<%#Eval("PictureUrl") %>' />--%>
                                </td>
                                <td>
                                    <asp:Button ID="btnEdit" runat="server" Text="编辑" CommandName="OnEdit" CommandArgument='<%# Eval("Id") %>' />
                                    <asp:Button ID="btnDelete" runat="server" Text="删除" CommandName="OnDelete" CommandArgument='<%# Eval("Id") %>' OnClientClick="return confirm('确定要删除该产品类别吗？');" />
                                    <%--<cc1:ConfirmButtonExtender ID="btnDelete_ConfirmButtonExtender" runat="server" ConfirmText="确定要删除该产品类别吗？"
                                        Enabled="True" TargetControlID="btnDelete" />--%>
                                    <%--<asp:Button ID="btnUp" runat="server" Text="∧" CommandName="OnUp" CommandArgument='<%# Eval("Id") %>' />
                                    <asp:Button ID="btnDown" runat="server" Text="∨" CommandName="OnDown" CommandArgument='<%# Eval("Id") %>' />--%>
                                </td>
                            </tr>
                        </ItemTemplate>
                        <InsertItemTemplate>
                            <tr>
                                <td>
                                </td>
                                <td>
                                    <asp:TextBox ID="txtName" runat="server" Text='<%# Bind("HotKeyWord1") %>' />
                                </td>
                                <td>
                                    <asp:TextBox ID="txtViewTimes" runat="server" Text='<%# Bind("ViewTimes") %>'></asp:TextBox>
                                </td>
                                <td>
                                    <asp:Button ID="btnInsert" runat="server" CommandName="OnInsert" Text="添加" />
                                    <asp:Button ID="btnCancel" runat="server" Text="取消" CommandName="OnCancel" CommandArgument='<%# Eval("Id") %>' />
                                </td>
                            </tr>
                        </InsertItemTemplate>
                        <EditItemTemplate>
                            <tr>
                                <td>
                                    <%# Container.DataItemIndex+1 %>
                                    <asp:HiddenField ID="hfId" runat="server" Value='<%#Eval("Id") %>' />
                                </td>
                                <td>
                                    <asp:TextBox ID="txtName" runat="server" Text='<%# Eval("HotKeyWord1") %>' />
                                </td>
                                <td>
                                    <asp:TextBox ID="txtViewTimes" runat="server" Text='<%# Eval("ViewTimes") %>'></asp:TextBox>
                                </td>
                                <td>
                                    <asp:Button ID="btnSave" runat="server" Text="确定" CommandName="OnUpdate" CommandArgument='<%# Eval("Id") %>' />
                                    <asp:Button ID="btnCancel" runat="server" Text="取消" CommandName="OnCancel" CommandArgument='<%# Eval("Id") %>' />
                                </td>
                            </tr>
                        </EditItemTemplate>
                    </asp:ListView>
        
    </div>
    </form>
</body>
</html>
